﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;

namespace DLL.ShowLayer
{
	public class AddViewBase : TonyNet4V1.ShowLayer.AddViewBase
	{
		/// <summary>
		/// 设置控件绑定值的通用类对象
		/// </summary>
		/// <![CDATA[2014-8-9 14:49:49]]>
		protected Controls clsControls;

		public AddViewBase(string strTotal)
			: base(strTotal)
		{
			clsControls = new Controls(Page);
		}

		protected override void SetControlCSS()
		{
			//base.SetControlCSS();
			btnOperation.CssClass = "Operation";
		}

		protected override void OnInit(EventArgs e)
		{
			if (Session["UserID"] != null)
			{
				((FormView)clsView).nUserID = Convert.ToInt32(Session["UserID"]);
				((FormView)clsView).nDepartmentID = Convert.ToInt32(Session["DepartmentID"]);
			}
			else
			{
				Response.Write("<script language=JavaScript>;parent.parent.location.href='login.aspx';</script>");
			}

			base.OnInit(e);
		}
	}
}
